# write by hashaki
# first edit on 2018/11/05 ,last change on 2018/11/05
# use pyecharts to pic

class Echarts:
    def __init__(self,jshost=None,echarts_dir=None,force_js_embed=None,output_image=None,theme=None):
        self.jshost=jshost,
        self.echarts_template_dir=echarts_dir,
        self.force_js_embed=force_js_embed,
        self.output_image=output_image,
        self.global_theme=theme
        
    def kLine(self,title,time,OGLC):
        '''展示k线,time=[],OGLC=[[1,2,3,4],[1,2,3,4],...]'''
        from pyecharts import Kline
        line=Kline('K线图')
        line.add(title,time,OGLC)
        line.render()
    
    def simpleLine(self,line_name,x_axi,y_axi):
        '''折线图'''
        from pyecharts import Line
        line=Line('折线图')
        line.add(line_name,x_axi,y_axi)
        line.render()